const fs = require('fs');
const http = require('http');
const path = require('path');
const server = http.createServer();
server.on('request', (req, res) => {
    const url = req.url;
    let ph = ''
    if (url == '/') {
        ph = path.join(__dirname, './vxTest/index.html')
    } else {
        //index.css
        //js
        ph = path.join(__dirname, './vxTest', url);
    }
    fs.readFile(ph, 'utf8', (err, data) => {
        if (err) return res.end('404');
        res.end(data)
    })
})
server.listen(89, () => {
    console.log('http://127.0.0.1:89');

})